package command

import (
	"context"
	"ddd-practice/domain"
)

type PutOffShelves struct {
	ProductId int
}

type PutOffShelvesHandler struct {
	productRepo domain.Repository
}

func NewPutOffShelvesHandler(repository domain.Repository) PutOffShelvesHandler {
	return PutOffShelvesHandler{
		productRepo: repository,
	}
}

func (h PutOffShelvesHandler) Handle(ctx context.Context, cmd PutOffShelves) error {

	return h.productRepo.PutOffShelves(ctx, cmd.ProductId)
}
